+2006-10-09 Øyvind Kolås <pippin@gimp.org>
+
+ Cleaned up the typedef for Babl, fixes issues with g++.
+
+ * babl/babl-classes.h:
+ * babl/babl-conversion.c: (conversion_new):
+ * babl/babl-fish-path.c: (babl_fish_path):
+ * babl/babl-fish-reference.c: (babl_fish_reference):
+ * babl/babl-fish-simple.c: (babl_fish_simple):
+
2006-09-26 Dominik Ernst <dernst@gmx.de>
* babl/babl-classes.h: fixed an issue with g++
} BablClassType;
+typedef union _Babl Babl;
/* common header for any item inserted into database */
typedef struct
typedef struct
BablConversion {
BablInstance instance;
- union Babl *source;
- union Babl *destination;
+ Babl *source;
+ Babl *destination;
long cost;
double error;
union
typedef struct
{
BablInstance instance;
- union Babl *source;
- union Babl *destination;
+ Babl *source;
+ Babl *destination;
double error; /* the amount of noise introduced by the fish */
void (*destroy) (void);
} BablExtension;
-typedef union Babl
+union _Babl
{
BablClassType class_type;
BablInstance instance;
BablFishSimple fish_simple;
BablFishPath fish_path;
BablExtension extension;
-} Babl;
+} _Babl;
#endif
}
babl->instance.id = id;
- babl->conversion.source = (union Babl*)source;
- babl->conversion.destination = (union Babl*)destination;
+ babl->conversion.source = source;
+ babl->conversion.destination = destination;
babl->conversion.error = -1.0;
babl->conversion.cost = 69L;
babl->instance.id = 0;
babl->instance.name = ((void *)babl) + sizeof(BablFishPath);
strcpy (babl->instance.name, name);
- babl->fish.source = (union Babl*)source;
- babl->fish.destination = (union Babl*)destination;
+ babl->fish.source = source;
+ babl->fish.destination = destination;
babl->fish.processings = 0;
babl->fish.pixels = 0;
babl->instance.id = 0;
babl->instance.name = ((void *)babl) + sizeof(BablFishReference);
strcpy (babl->instance.name, name);
- babl->fish.source = (union Babl*)source;
- babl->fish.destination = (union Babl*)destination;
+ babl->fish.source = source;
+ babl->fish.destination = destination;
babl->fish.processings = 0;
babl->fish.pixels = 0;
babl->instance.id = 0;
babl->instance.name = ((void *)babl) + sizeof(BablFishSimple);
strcpy (babl->instance.name, name);
- babl->fish.source = (union Babl*)conversion->source;
- babl->fish.destination = (union Babl*)conversion->destination;
+ babl->fish.source = conversion->source;
+ babl->fish.destination = conversion->destination;
babl->fish.processings = 0;
babl->fish.pixels = 0;